/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package coba.service.impl;

import java.util.Date;
import java.util.List;

import com.liferay.portal.kernel.exception.SystemException;

import coba.model.Guia;
import coba.model.Solicitud;
import coba.model.SolicitudGuia;
import coba.service.base.SolicitudGuiaLocalServiceBaseImpl;

/**
 * The implementation of the SolicitudGuia local service.
 *
 * <p>
 * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link coba.service.SolicitudGuiaLocalService} interface.
 *
 * <p>
 * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
 * </p>
 *
 * @author rodri042
 * @see coba.service.base.SolicitudGuiaLocalServiceBaseImpl
 * @see coba.service.SolicitudGuiaLocalServiceUtil
 */
public class SolicitudGuiaLocalServiceImpl
	extends SolicitudGuiaLocalServiceBaseImpl {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never reference this interface directly. Always use {@link coba.service.SolicitudGuiaLocalServiceUtil} to access the SolicitudGuia local service.
	 */

	public SolicitudGuia add(long solicitudId, long guiaId) throws SystemException {

		SolicitudGuia solicitudGuia = solicitudGuiaPersistence.
				create(counterLocalService.increment(SolicitudGuia.class.getName()));

		solicitudGuia.setSolicitudId(solicitudId);
		solicitudGuia.setGuiaId(guiaId);

		return super.addSolicitudGuia(solicitudGuia);

	}

	public List<SolicitudGuia> findBySolicitudId(long solicitudId) throws SystemException {
		return solicitudGuiaPersistence.findBySolicitudId(solicitudId);
	}

	public int countBySolicitudId(long solicitudId) throws SystemException {
		return solicitudGuiaPersistence.countBySolicitudId(solicitudId);
	}

	public void removeBySolicitudId(long solicitudId) throws SystemException {
		solicitudGuiaPersistence.removeBySolicitudId(solicitudId);
	}
	
}
